package com.zzuisa.sell.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * @ClassName JsonUtil
 * @Description TODO
 * @Author SunAo
 * @Date 2018/8/20 下午12:05
 * @Version 1.0
 */
public class JsonUtil {
    public static String toJson(Object object) {
        GsonBuilder gsonBuilder = new GsonBuilder();
        gsonBuilder.setPrettyPrinting();
        Gson gson = gsonBuilder.create();
        return gson.toJson(object);
    }
}
